package com.qk.management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qk.domain.user.UserDO;
import com.qk.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    List<UserDO> selectByPage(String name, Integer status, String phone, Integer deptId);


    @Select("select * from user where id = #{id}")
    User getUserById(Integer id);

    void update(User user);

    List<User> listByRole(String roleLabel);

    void deleteUsers(List<Integer> ids);

    @Select("select * from user where username = #{username}")
    User selectByUsername(String username);
}
